<?php get_header(); $theme_options = get_option('po_theme'); ?>

<div id="wrapper">
	<div id="content" class="homebg">
	<div id="cc">
	<div id="top_cover"><!-- --></div>
	<?php // FEATURED
		$source = $theme_options['thumbs_source'];
		if ($source<>"" && $source!="none") { ?>
			<div class="loading-ding-ding"><!-- --></div>
			<div id="featarea">
				<?php 
					if ($source=="posts") {include(TEMPLATEPATH."/inc/featured/posts.php");}
					elseif ($source=="flickr") {include(TEMPLATEPATH."/inc/featured/flickr.php");}
				?>
				<div class="clear"><!-- --></div>
			</div>
	<?php ;} else echo '<div class="pb20"><!-- --></div>'; ?>
	<div id="custom_frontpage">
	<?php	// CUSTOM FRONTPAGE
		if (!($theme_options['frontpage']<>"")) {
			?>
			<div style="text-align:center;">
				<h1>Welcome and thank you for purchasing.</h1>
				<h3>Your Flickr photos or featured posts goes here.</h3>
				<p>Please, take a look <code>Admin Panel > Theme Settings > Homepage</code>. Select a source of thumbnails which will be shown here.</p>
				<h3>Custom Frontpage</h3>
				<p>Here is a <a class="tooltip" href="http://polafolio.pandathemes.com/homepage/#custom" title="A standalone WordPress page selected by you via Theme Panel">Custom Frontpage</a> section. Please, select a page <code>Admin Panel > Theme Settings > Homepage > Custom Frontpage</code> <br>which will be shown here.</p>
			</div>
			<?php ;
		}
		elseif ($theme_options['frontpage']=="none") {}
		else {
			$page = $theme_options['frontpage'];
			$arr = get_post($page);
			$id = $arr->ID;
			query_posts('page_id='.$id);
			while (have_posts()) : the_post();
			the_content();
			endwhile; wp_reset_query();
		}
	?>
	</div>
<?php get_footer(); ?>